package kr.hkit.androidcomplete02.ch13;

import kr.hkit.androidcomplete02.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;


public class SeekBarEx extends Activity {
	SeekBar mSeekBar;
	TextView mVolume;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch13_seekbarex);
		
		mSeekBar = (SeekBar) findViewById(R.id.ch13_seekbar);
		mVolume = (TextView) findViewById(R.id.ch13_volume);
		mSeekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
			public void onStopTrackingTouch(SeekBar seekBar) {
			}

			public void onStartTrackingTouch(SeekBar seekBar) {
			}

			public void onProgressChanged(SeekBar seekBar, int progress,
					boolean fromUser) {
				mVolume.setText("Now Volume : " + progress);
			}
		});
	}
}